package com.check.operation.model;

import java.util.Comparator;

import com.szj.basic.model.BaseObject;
import com.szj.util.SysUtil;

public class Ssroom extends BaseObject implements Comparable<Ssroom>, Comparator<Ssroom> {
	private static final long serialVersionUID = 1L;
	
	public  String code;
	public String name;
	public String py_code;
	
	@Override
	public String toString() {
		return name;
	}

	@Override
	public int compareTo(Ssroom another) {
		if(this.code == null) {
			return -1;
		}
		if(another == null || another.code == null) {
			return 1;
		}
		return Integer.valueOf(this.code) - Integer.valueOf(another.code);
	}

	@Override
	public int compare(Ssroom lhs, Ssroom rhs) {
		if(lhs == null || lhs.code == null) {
			return -1;
		}
		if(rhs == null || rhs.code == null) {
			return 1;
		}
		return Integer.valueOf(lhs.code) - Integer.valueOf(rhs.code);
	}
	
	
	
}
